package com.ccsoft.static_package_mult_ds.controller;

import com.ccsoft.static_package_mult_ds.entity.Order;
import com.ccsoft.static_package_mult_ds.entity.User;
import com.ccsoft.static_package_mult_ds.service.OrderService;
import com.ccsoft.static_package_mult_ds.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author chanchaw
 * @create 2022-09-17 10:05
 */
@CrossOrigin
@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    private UserService service;

    @GetMapping("/select")
    public List<User> selectAll(){
        return service.selectAll();
    }
}
